In [2]:
import numpy as np
In [4]:
ones_arr=np.ones((5,5),dtype=int)
ones_arr
Out[4]:
array([[1, 1, 1, 1, 1],
[1, 1, 1, 1, 1],
[1, 1, 1, 1, 1],
[1, 1, 1, 1, 1],
[1, 1, 1, 1, 1]])
In [5]:
ones_arr * 255
Out[5]:
array([[255, 255, 255, 255, 255],
[255, 255, 255, 255, 255],
[255, 255, 255, 255, 255],
[255, 255, 255, 255, 255],
[255, 255, 255, 255, 255]])
In [78]:
import matplotlib.pyplot as plt
In [8]:
matplotlib inline #all graph should keep inside the line
In [9]:
from PIL import Image #python image library
In [28]:
horse_img=Image.open(r"C:\Anitha\image\pexels-wildlittlethingsphoto-1996333.jpg")
horse_img
Out[28]: